home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
lcppb.zip
/
README.TXT
< prev
Wrap
Text File
|
1991-07-08
|
5KB
|
153 lines
-----------------------------------------
Learning C++ (1991-SAMS)
by Tom Swan (CIS ID-73627,3241 MCI-TSWAN)
Borland C++ 2.0 Conversion Kit
Date: 07/08/1991
-----------------------------------------
(C) 1991 by Tom Swan. All rights reserved.
These notes explain how to install and compile the Borland C++ source
code files for my book Learning C++, published by SAMS. Although the
book comes complete with its own C++ compiler (supplied by Zortech),
many people have requested a conversion kit for Borland C++ 2.0.
There is no charge for these conversions, and you may freely
distribute the LCPPB.ZIP file in its original form.
The listings are compressed and stored in "ZIP" files. To use them
along with Learning C++, you'll have to:
o Create a few subdirectories
o Unpack various .ZIP files using PKUNZIP or a similar utility
o Run Borland's Make utility to compile the programs
Except for common library routines, all programs are supplied in text
form only. Before you can run the programs, you must compile them
with Borland C++ version 2.0. Here's how:
UNPACKING THE ZIP FILES
-----------------------
Make a new directory named LCPPB on any drive. The directory must be
named LCPPB and must be at the root (outer) level. (See "MODIFYING
THE MAKE FILES" if you want to use a different directory.) These notes
assume you are using drive C:, but you may replace C: with any drive
letter. To create the necessary directories, enter these commands:
c:
cd \
md lcppb
cd lcppb
md lib
md answers
md source
Next, copy LCPPB.ZIP to \LCPPB. To unpack the ZIP files, use PKUNZIP
or another similar utility, and enter these commands:
c:
cd \lcppb
pkunzip lcppb
pkunzip lcpplib.zip lib
pkunzip lcppans.zip answers
pkunzip lcpp0?.zip source
del *.zip
You now have three subdirectories: \LCPPB\SOURCE contains all of the
listings from chapters 1, 2, 3, 4, 5, 8, and 9. \LCPPB\LIB contains
common library files and all of the listings from chapters 6 and 7.
\LCPPB\ANSWERS contains the listings for the book's Answer's to
Questions and Exercises.
Next, you'll change to each of the three subdirectories and compile
the programs. Make sure the command-line compiler BCC.EXE, the linker
TLINK.EXE, the library manager TLIB.EXE, and the Make utility
MAKE.EXE are on the system PATH. Then enter the following commands to
compile the listings:
c:
cd \lcppb\lib
make -fmakelib
cd ..\answers
make -fmakeans
cd ..\source
make -fmakec01
make -fmakec02
make -fmakec03
make -fmakec04
make -fmakec05
make -fmakec08
make -fmakec09
The MAKE files for chapters 1-5 and 8-9 are stored separately so you
can copy or delete files for one chapter without affecting files for
other chapters.
MODIFYING THE MAKE FILES
------------------------
If you set up your directories as described above, you shouldn't have
to modify the MAKE files. But if you want to use a different
directory structure, you'll have to make some changes. First, load
the appropriate MAKE file into your editor, then find the line that
reads:
lib=\lcppb\lib
Change \lcppb\lib to the path where you store the files unpacked from
LCPPLIB.ZIP. The path may also include a drive letter. Make the
identical change to each MAKE file.
Except for the files in \LCPPB\LIB, other files may be stored in any
directory or directories without requiring any changes to the MAKE
files.
CHANGES TO LISTINGS
-------------------
I made only the minimum number of changes required to compile the
listings with Borland C++. In most programs, I preceded the original
programming with // comment symbols so you can easily compare the
differences between the Zortech C++ and Borland C++ 2.0
implementations. Where I made extensive modifications (and in the
answers to exercises), I did not retain the original code.
Most changes were minor--a new #include declaration here or a slight
alteration to syntax there. Some programs, especially those that read
DOS directories, required more extensive work.
A few name changes where unavoidable, the most significant being the
window class which I had to rename cwindow.
Since the Zortech C++ compiler supplied to me uses the older STREAM
implementation, it was necessary to replace <stream.hpp> with
<iostream.h> and to make other related modifications.
ABOUT DISP.H and DISP.CPP
-------------------------
Module DISP.CPP and its header file DISP.H are partial replacements
for the DISP (direct-video display) module in Zortech C++. This
module is not in the book. The replacement module duplicates some,
but not all, of the functions in the Zortech version. I converted
only those functions, variables, and constants needed to compile the
book's listings.
In Zortech C++, functions disp_peekbox() and disp_pokebox() declare
their first parameters as type unsigned *. In the replacement module,
these function parameters are declared as void far *. Other
parameters in other functions are identical in both versions.
COMMENTS
--------
Please send any comments to me via Compuserve or MCI Mail to the
addresses at the beginning of this file.
Enjoy!